﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;

using Bricks.Component.Utils;
using Bricks.Site.Models;
using Bricks.Business.Models.ScheduleManagement;


namespace Bricks.Business.Service
{
    public interface IYearPlanService
    {
        IQueryable<YearPlan> YearPlans { get; }

        #region 主界面加载
        List<YearPlanView> GetYearPlanList(Guid projectID, string contractType, Guid contractID);

        List<YearPlanDetailsView> GetYearPlanDetailList(Guid projectID, string contractType, Guid contractID, Guid yearPlanID, bool isPreview = true);

        List<YearPlanView> GetYearPlanReviseList(Guid yearPlanID);

        List<YearPlanDetailsView> GetYearPlanReviseDetailList(Guid projectID, string contractType, Guid contractID, Guid yearPlanReviseID);

        List<YearPlanView> GetYearPlanListForPreview(Guid projectID, string contractType, List<Guid> lstContractID);

        List<YearPlanDetailsView> GetYearPlanDetailListForPreview(Guid projectID, string contractType, List<Guid> lstContractID, string statisticalCycle);
        #endregion

        #region 单据操作
        OperationResult Delete(Guid yearPlanID);

        OperationResult Revise(Guid yearPlanID,Guid yearPlanReviseID);

        YearPlanView GetYearPlanByID(Guid id);

        void SaveYearPlan(YearPlanView yearPlanView, List<YearPlanDetailsView> saveList, bool isUpdateDetails = true);

        void AddReviseData(Guid yearPlanID);
        #endregion

        #region   拨付款 支表二 图表部分里面的年度数据
        string GetTotalReviseMoney(Guid projectID, string contractType, Guid contractID);

        List<PointView> GetYearPlanComplete(Guid projectID, Guid contractID, double totalReviseMoney);
        #endregion

        #region 进度查询
        string GetTotalReviseMoneyForMulContract(Guid projectID, string contractType, List<Guid> lstContractID);

        List<PointView> GetYearPlanCompleteForMulContract(string projectID, string contractType, string contractIDSQLWhere, List<Guid> lstContractID, decimal totalReviseMoney);
        #endregion
    }
}